package com.xy.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

//注册到spring容器中
@Component
//将yaml配置文件的属性复制给实体类（配置类）
@ConfigurationProperties(prefix ="dog")
public class Dog {
    private String ListName;
    private Integer age;


    public Dog(String listName, Integer age) {
        ListName = listName;
        this.age = age;
    }

    public Dog() {
    }

    public String getListName() {
        return ListName;
    }

    public void setListName(String listName) {
        ListName = listName;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "ListName='" + ListName + '\'' +
                ", age=" + age +
                '}';
    }
}
